{template header}
{if $tips}
<div class="alert">{$tips}<a class="close" data-dismiss="alert" href="#">&times;</a></div>
{else}
<style type="text/css">
 td, th {
        min-width: 80px; max-width: 300px;   text-align: center;
}
    td.comment{max-width: 600px; text-indent: inherit;word-wrap:break-word;word-break:normal;}
</style>
<div class="bs-docs-example" style="clear:both;">
<a href="index.php?c=admin&a=addGearComment&gearId=$gearId">添加评论</a>
    <table class="table table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>用户昵称</th>
                <th>用户头像</th>
                <th>评论内容</th>
                <th>图片</th>
                <th>有用</th>
                <th>没用</th>
                <th>评论日期</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {loop $allcomment $k $v}
            <tr>
                <td>{$v['commentId']}</td>
                <td>{$v['nickname']}</td>
                <td><img src="{$v['header']}" width="40" height="40"></td>
                <td class="comment">{$v['content']}</td>
                <td>
                    {loop $v['image'] $kk $img}
                       <a href='$img' target="_blank"> <img style="max-width:30px;max-height:30px;" src="{$img}"></a>
                    {/loop}
                </td>
                <td>{$v['usefull']}</td>
                <td>{$v['nouse']}</td>
                <td>{eval echo date('Y-m-d H:i:s', $v['addTime'])}</td>
                <td>
                    {if $v['isShow'] == 1}
                    <a class="btn btn-danger" href="?c=admin&a=eidtGearComment&type=hidden&commentId={$v['commentId']}&gearId={$v['gearId']}">隐藏</a>
                    {else}
                    <a class="btn btn-primary" href="?c=admin&a=eidtGearComment&type=show&commentId={$v['commentId']}&gearId={$v['gearId']}">显示</a>
                    {/if}
                </td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{/if}
{template footer}
